package spreadsheet;
/**
 * This is a non-mutable point class.
 * 
 * @author Jonathan
 *
 */
public class CellPoint {

	/**
	 * The x coordinate.
	 */
	public final int col;
	
	/**
	 * The y coordinate.
	 */
	public final int row;
	
	/**
	 * Creates a new CellPoint.
	 * 
	 * @param the_x The x coordinate.
	 * @param the_y The y coordinate.
	 */
	public CellPoint(int the_row, int the_col) {
		col = the_col;
		row = the_row;
	}
	
	public boolean equals(final Object the_object) {
		if (the_object == null && !(the_object instanceof CellPoint)){
			return false;
		}
		CellPoint other_point = (CellPoint) the_object;
		return (col == other_point.col && row == other_point.row);
		
	}
}
